let net = require('net');

let server = net.createServer({}, function(socket){
    // 当客户端连接是执行的回调函数
    // socket其实是一个可读可写流

    socket.setEncoding('utf8')
    console.log(socket.address())
    socket.on("data",function(){

    })
    socket.on("end", function(){

    })
    socket.on("close", function(){

    })
});

server.listen(8080, function(){
    console.log(1111111111)
})


